package com.baby.work.controller;

import com.baby.work.service.IocService;
import com.baby.work.service.WorkService;
import com.baby.work.service.WorkServiceInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/work")
@Configuration
public class WorkController {

    @Autowired
    private WorkServiceInterface workService;

    @Autowired
    private IocService iocService;

    @GetMapping("/ioc")
    public String testIoc() {
        return iocService.doIoc();
    }

    @GetMapping("/test")
    public String test() {
        return "Success~~";
    }

    @GetMapping("/do")
    public String doWork() {
        return workService.doWork();
    }



}
